<template>
	<view class="feedback-wrap">
		<view class="jzjl">
			<view class="wd-title c-flex c-item-center">
				<image src="../../../static/images/common/sm-icon.png" ></image>
				<text>产品建议</text>
			</view>
			<view class="wd-content">
				<view class="uni-textarea">
						<textarea placeholder-style="color:#9B9B9B;font-size: 14px;" v-model="comment" placeholder="添加见证记录"/>
				</view>
			</view>
		</view>
		<view class="submit-bt" @click="onPublish()">提交</view>
	</view>
</template>

<script>
	import {toast} from '@/utils/utils.js';
	export default {
		components:{},
		data() {
			return {
				comment:'',
				imgList:[]
			};
		},
		onLoad(option) {
		},
		methods:{
			//提交见证信息
			onPublish(){
				if(!this.comment){
					toast('内容不能为空!','error');
					return;
				}
				
				this.$API.witness(params).then(res => {
						uni.showToast({
							title: "提交成功!"
						})
						
				});
			},
			//获取上传图片url
			onGetUrl(e){
				const arr = this.imgList.filter(item => {return item.type == e.type});
				if(arr.length == 0){
					this.imgList.push(e);
				}else{
					arr[0].url = e.url;
					this.imgList = this.imgList.concat(arr);
				}
			},
		}
	}
</script>

<style>page{height:100%;background: #F9F9F9;}</style>
<style lang="scss" scoped>
.feedback-wrap{
	height: 100%;padding: 20rpx 38rpx 34rpx;
	.wd-content{background: #FFFFFF;border-radius: 20rpx;padding: 26rpx 16rpx 24rpx 36rpx;margin-bottom: 26rpx;}
	.wd-title{
		margin: 0 0 18rpx -26rpx;
		image{width: 56rpx;height: 56rpx;margin-right: -10rpx;}
		text{font-size: 30rpx;font-weight: 600;color: #333333;}
	}
	.tip-con{
		font-size: 20rpx;font-weight: 500;color: #FE5604;;margin:20rpx 0;border-radius:12rpx;padding: 16rpx;background: rgba(254, 86, 4, 0.1);
	}
	.submit-bt{
		margin: 22rpx 0;height: 90rpx;line-height: 90rpx;text-align: center;background: #2986FF;
		border-radius: 20rpx;font-size: 28rpx;color: #FFFFFF;
	}
}
</style>